<!DOCTYPE html>
<html>
<head>
	<title>Keyboard</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">

	<!-- jQuery, -->
	<script src="jquery/jquery-1.9.1.min.js"></script>

	<!-- Fotorama -->
	<link  href="../out/fotorama.css" rel="stylesheet">
	<script src="../out/fotorama.js"></script>

  <script type="text/javascript">
    $(function () {
      f = $('.fotorama').data('fotorama');
    })
  </script>
</head>

<body>

<p>Keyboard:<p>
<pre style="margin-top: -1em; margin-left: 1em;"><code>&lt;div class="fotorama"
     <mark>data-keyboard="true"</mark>></code></pre>

<textarea name="" id="" cols="30" rows="10"></textarea>

<!-- Keys -->
<style>
	.key {
		color: #fff;
		background-color: #333;
		border-bottom: none;
		border-radius: 3px;
		padding: 2px 4px;
		cursor: pointer;
		position: relative;
	}

	.key:active {
		top: 1px;
	}
</style>
<script>
$(function () {
	$('.js-arrow').on('mousedown', function (e) {
		e.preventDefault();

		var $this = $(this),
				data = $this.data(),
				fotorama = $(data.fotorama).data('fotorama');

		fotorama && fotorama.show({index: data.show, slow: e.altKey});
	});
});
</script>

<p>Press <strong class="key js-arrow" data-fotorama="#keyboard" data-show="<">←</strong> and <strong class="key js-arrow" data-fotorama="#keyboard" data-show=">">→</strong> on the keyboard:</p>

<!-- Just don’t want to repeat this prefix in every img[src] -->
<base href="i/okonechnikov/">

<!-- Fotorama -->
<div class="fotorama"
     id="keyboard"
     data-keyboard='{"space":true, "home":true, "end":true}'
     data-loop="true"
     data-width="700"
     data-ratio="3/2"
     data-max-width="100%">
	<a href="2-lo.jpg"></a>
	<a href="3-lo.jpg"></a>
	<a href="5-lo.jpg"></a>
	<a href="8-lo.jpg"></a>
	<a href="6-lo.jpg"></a>
</div>

<!-- © -->
<p>Photos <a href="http://okonet.ru/">by Andrey Okonetchnikov</a></p>
</body>
</html>